@extends('statistical.layout')
@section("content")
    @if (session()->has('success'))
        <div class="alert alert-success" role="alert">
            {{ session('success') }}
        </div>
    @elseif (session()->has('error') || (isset($errors) && $errors->all()))
        <div class="alert alert-danger" role="alert">
            {{ session('error') }}
            @if(isset($errors) && $errors->all())
                {{ $errors->first('username') }}
                {{ $errors->first('password') }}
            @endif
        </div>
    @endif
    <form method="POST" action="{{ url('statistical/user/create-user') }}">
        {{ csrf_field() }}
        <div class="form-group">
            <label for="username">账号名称</label>
            <input name="username" type="text" class="form-control" id="username" required placeholder="请输入账号名称">
        </div>
        <div class="form-group">
            <label for="password">账号密码</label>
            <input type="password" name="password" required class="form-control" id="password"
                   placeholder="请输入账号密码">
        </div>
        <button type="submit" class="btn btn-primary">添加账号</button>
    </form>
@endsection
